(in-package #:test.org.apache.zookeeper.audit)

(defclass Slf4JAuditLoggerTest()
  ())

(defclass my-resource ()())

(defmethod clean-up-resource ((resource my-resource))
  ())



;; 64
(defmethod setUpBeforeClass ((clz Slf4JAuditLoggerTest))
  (let ((a (make-instance 'System))
	(b (setProperty a (solt-value (make-instance 'ZKAuditProvider) 'AUDIT_ENABLE) "true"))
	(c (setProperty a "zookeeper.extendedTypesEnabled" "true"))
	(loggerTestTool (make-instance 'loggerTestTool :cls (find-class 'Slf4jAuditLogger))))
    ()))



(def-fixture my-setup-fixture ()
  ;; Code to run before all tests in a suite that uses this fixture
  (format t "~&Setting up the environment before tests...~%")
  (let ((resource (make-instance 'my-resource)))
    (unwind-protect
	 (progn
	   ;; Bind the resource to a dynamic variable or pass it to tests
	   (setf *my-global-resource* resource)
	   (&body)) ; This executes the tests using the fixture
      ;; Code to run after all tests using this fixture
      (format t "~&Tearing down the environment after tests...~%")
      (clean-up-resource resource))))

(test my-test-suite ()
	    (with-fixture my-setup-fixture ()
	      (test test-case-1
		;; Test code that uses the setup
		(is (eql 1 1)))
	      (test test-case-2
		;; Another test case using the same setup
		(is (eql 2 2)))))
